package com.cff.shorturl.db;

import java.sql.Connection;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.SQLException;
import org.apache.commons.dbcp2.BasicDataSource;
import org.apache.commons.dbcp2.BasicDataSourceFactory;

public class DbcpDbManager extends DbManager {
	private static BasicDataSource dataSource=null;


	protected DbcpDbManager() {
		try {
			dataSource = BasicDataSourceFactory.createDataSource(properties);
		} catch (Exception e) {
			e.printStackTrace();
		}

	}

	@Override
	public Connection getConnection() throws SQLException {
		return dataSource.getConnection();
	}

}
